<?php
class WebUser extends RWebUser{
	
	public function getFullName(){
		return 'Admin';
	}
	
	public function isSuperAdmin(){
		$roles = Rights::getAssignedRoles($this->id);
		foreach ($roles as $role){
			if($role->name == 'Admin'){
				return true;
			}
		}
		return false;
	}
	
	public function isBranchAdmin(){
		$roles = Rights::getAssignedRoles($this->id);
		foreach ($roles as $role){
			if($role->name == 'Admin Cabang'){
				return true;
			}
		}
		return false;
	}
}